// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   RangeCategorySeries.java

package org.achartengine.model;

import java.util.ArrayList;
import java.util.List;

// Referenced classes of package org.achartengine.model:
//			CategorySeries, XYSeries

public class RangeCategorySeries extends CategorySeries
{

	private List mMaxValues;

	public RangeCategorySeries(String s)
	{
		super(s);
		mMaxValues = new ArrayList();
	}

	public synchronized void add(double d, double d1)
	{
		super.add(d);
		mMaxValues.add(Double.valueOf(d1));
	}

	public synchronized void add(String s, double d, double d1)
	{
		super.add(s, d);
		mMaxValues.add(Double.valueOf(d1));
	}

	public synchronized void remove(int i)
	{
		super.remove(i);
		mMaxValues.remove(i);
	}

	public synchronized void clear()
	{
		super.clear();
		mMaxValues.clear();
	}

	public double getMinimumValue(int i)
	{
		return getValue(i);
	}

	public double getMaximumValue(int i)
	{
		return ((Double)mMaxValues.get(i)).doubleValue();
	}

	public XYSeries toXYSeries()
	{
		XYSeries xyseries = new XYSeries(getTitle());
		int i = getItemCount();
		for (int j = 0; j < i; j++)
		{
			xyseries.add(j + 1, getMinimumValue(j));
			xyseries.add(j + 1, getMaximumValue(j));
		}

		return xyseries;
	}
}
